<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %> 
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>   
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" href="${host_url}/css/app/common.css">
<link rel="stylesheet"  href="${host_url}/css/app/member_center.css">
<script src="${host_url}/js/app/jquery.min.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
<title>会员中心</title>
<script type="text/javascript">
  document.getElementsByTagName('html')[0].style.fontSize = document.documentElement.clientWidth/50 + 'px';
  $(function(){
	  /* var myDate = new Date();
	  var month=myDate.getMonth()+1;
	  var month1=myDate.getMonth();  一个月前 
	  month1 = month1+"月总销量";
	  month = month+"月总销量";
	  $("#one_months_ago").html(month1);
	  $("#now_months").html(month); */
	  
  });
</script>
</head>
<body>
<div class="top-personal">
	<div class="clearfix">
	      <p class="portrait" >
	      <c:choose>
			   <c:when test="${cur.logo !=null}">  
			        <img src="${cur.logo}" alt="" class="man">    
			   </c:when>
			   <c:otherwise> 
			     	<img src="${host_url}/img/u5729.png" alt="" class="man">
			   </c:otherwise>
			</c:choose>
	      </p>
	    <p class="black">
	    	<span class="name">${cur.nick_name}</span>
	    	<span class="grade">当前会员等级 : &nbsp;
	    	<c:if test="${cur.level==127}">  
		    	${cur.level_name}
		    </c:if>
	    	<c:if test="${cur.level==126}">  
		    	${cur.level_name}
		    </c:if>
	    	<c:if test="${cur.identity ==118 and cur.level !=122 and cur.level !=123}">
		    	${cur.level_name}
		    </c:if>
	    	<c:if test="${cur.level==123}">
		    	${cur.level_name}
		    </c:if>
	    	<c:if test="${cur.level==122}">
		    	${cur.level_name}
		    </c:if>
	    	
	        </span>
    	</p>
	</div>
</div>

<h2 class="privilege title-2" id="contentTitle">${masterName}专区</h2>

<div class="data clearfix">
	<ul  class="have clearfix" >
		<li class="leftArea">你当前享有</li>
		<li class="rightArea">${masterName}享有</li>
	</ul>
	<ul  class="data-1 clearfix">
		<c:if test="${cur.level==127 || cur.level==126}">
			<li class="leftArea">0<span>折</span></li>
		</c:if>
		<c:if test="${cur.level!=127 and cur.level!=126}">
			<li class="leftArea"><fmt:formatNumber value="${cur.rate*10}" pattern="#0.0" maxFractionDigits="1"/><span>折</span></li>
		</c:if>
		<li class="rightArea"><fmt:formatNumber value="${master.rate*10}" pattern="#0.0" maxFractionDigits="1"/> <span>折</span></li>
	</ul>
	<div  class="data-2">
		<div class=" data-2-1"></div>
		<div class=" data-2-2-wrap po-a" style="width:50%;">
			<div class="po-r" style="height:10px; padding:0 17px 0 1px;text-align:right;">
				<div class=" data-2-2" style="width:${(1-cur.rate)*100/(1-master.rate)}%;"></div>
			</div>
		</div>
		<div class=" data-2-3"></div>
		<div class="data-2-4"><img src="${host_url}/img/u5761.png" alt=""></div>
		<div class="po-r data-2-5">${ticket_name}充值优惠</div>
	</div>
	<ul  class="data-1 clearfix">
		<c:if test="${cur.level == 122}">
			<li class="leftArea"><fmt:formatNumber value="${master.master_rate*100}" pattern="#0" maxFractionDigits="0"/> <span>%</span></li>
		</c:if>
		<c:if test="${cur.level != 122}">
			<li class="leftArea">0 <span>%</span></li>
		</c:if>
			<li class="rightArea"><fmt:formatNumber value="${master.master_rate*100}" pattern="#0" maxFractionDigits="0"/><span>%</span></li>
	</ul> 
	<div  class="data-2 master clearfix">
		<div class="leftArea data-2-1"></div>
		<div class=" data-2-2-wrap po-a" style="width:50%;">
			<div class="po-r" style="height:10px; padding:0 17px 0 1px;text-align:right;">
			<c:if test="${cur.level == 122}">
				<div class="data-2-2" style="width:${(1-master.master_rate)*100/(1-master.master_rate)}%;"></div>
			</c:if>	
			<c:if test="${cur.level != 122}">
				<div class="data-2-2" style="width:0%;"></div>
			</c:if>	
			</div>
		</div>
		<div class="leftArea data-2-3"></div>
		<div class="data-2-4"><img src="${host_url}/img/u5783.png" alt=""></div>
		<div class="po-r data-2-5">${master.master_name}</div>
	</div>
</div>

<div class="thick"></div>
<h2 class="privilege title-2">如何成为${masterName}</h2>
<div class="data clearfix">
	<ul  class="have clearfix">
		<li class="leftArea">当前完成状态</li>
		<li class="rightArea">${masterName}要求</li>
	</ul>
	<ul  class="data-1 clearfix">
		<li class="leftArea">${cur.level_num} <span>人</span></li>
		<li class="rightArea">${master.level_num} <span>人</span></li>
	</ul>
	<div  class="data-2 data-3">
		<div class="leftArea data-2-1"></div>
		<div class=" data-2-2-wrap po-a" style="width:50%;">
			<div class="po-r" style="height:10px; padding:0 17px 0 1px;text-align:right;">
				<div class=" data-2-2" style="width:${(cur.level_num/master.level_num)*100}%;"></div>
			</div>
		</div>
		<div class="leftArea data-2-3"></div>
		<div class="data-2-4"><img src="${host_url}/img/u6225.png" alt=""></div>
		<div class="po-a data-2-5">团队内${expertName}及以上成员</div>
	</div>
	
<%-- 	<ul  class="data-1 clearfix">
		<li class="leftArea">${cur.children_num}  <span>人</span></li>
		<li class="rightArea">${master.children_num}  <span>人</span></li>
	</ul>
	<div  class="data-2 data-4">
		<div class="leftArea data-2-1"></div>
		<div class=" data-2-2-wrap po-a" style="width:50%;">
			<div class="po-r" style="height:10px; padding:0 17px 0 1px;text-align:right;">
				<div class=" data-2-2" style="width:${(cur.children_num/master.children_num)*100}%;"></div>
			</div>
		</div>
		<div class="leftArea data-2-3"></div>
		<div class=" data-2-4"><img src="${host_url}/img/u6227.png" alt=""></div>
		<div class="po-r data-2-5">邀请好友</div>
	</div>
	
	<ul  class="data-1 clearfix">
		<li class="leftArea">${cur.first_month_consume}  <span>券</span></li>
		<li class="rightArea">${master.first_month_consume}  <span>券</span></li>
	</ul>
	<div class="data-2 data-5">
		<div class="data-2-1"></div>
		<div class=" data-2-2-wrap po-a" style="width:50%;">
			<div class="po-r" style="height:10px; padding:0 17px 0 1px;text-align:right;">
				<div class=" data-2-2" style="width:${(cur.first_month_consume/master.first_month_consume)*100}%;"></div>
			</div>
		</div>
		<div class="data-2-3"></div>
		<div class="data-2-4"><img src="${host_url}/img/u6229.png" alt=""></div>
		<div class="po-r data-2-5" id="one_months_ago">月总消费</div>
	</div> --%>
	
	<ul  class="data-1 clearfix">
		<li class="leftArea">${cur.second_month_consume} <span>券</span></li>
		<li class="rightArea">${master.first_time_consume} <span>券</span></li>
	</ul>
	<div class="data-2 data-6">
		<div class="data-2-1"></div>
		<div class=" data-2-2-wrap po-a" style="width:50%;">
			<div class="po-r" style="height:10px; padding:0 17px 0 1px;text-align:right;">
				<div class=" data-2-2" style="width:${(cur.second_month_consume/master.first_time_consume)*100}%;"></div>
			</div>
		</div>
		<div class="data-2-3"></div>
		<div class="data-2-4"><img src="${host_url}/img/u6229.png" alt=""></div>
		<div class="po-r data-2-5">本月总业绩</div>
	</div>
</div>

<div class="thick"></div>
<h2 class="privilege">规则说明</h2>
<p class="explain">${expertName}和${masterName}，将在每月初进行考核。若满足上述条件，升级或维持${masterName}等级。若不满足，则将降级或维持${expertName}等级。</p>
</body>
</html>